home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / X11R4 / cmds / X / include / RCS / gcstruct.h,v < prev    next >
Encoding:
Text File  |  1990-02-15  |  4.2 KB  |  152 lines

  1. head     1.1;
  2. branch   ;
  3. access   ;
  4. symbols  ;
  5. locks    ; strict;
  6. comment  @ * @;
  7.  
  8.  
  9. 1.1
  10. date     90.02.14.16.17.19;  author tve;  state Exp;
  11. branches ;
  12. next     ;
  13.  
  14.  
  15. desc
  16. @Original X11R4 distribution
  17. @
  18.  
  19.  
  20.  
  21. 1.1
  22. log
  23. @Initial revision
  24. @
  25. text
  26. @/* $XConsortium: gcstruct.h,v 5.2 89/07/18 17:56:45 rws Exp $ */
  27. /***********************************************************
  28. Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts,
  29. and the Massachusetts Institute of Technology, Cambridge, Massachusetts.
  30.  
  31.                         All Rights Reserved
  32.  
  33. Permission to use, copy, modify, and distribute this software and its 
  34. documentation for any purpose and without fee is hereby granted, 
  35. provided that the above copyright notice appear in all copies and that
  36. both that copyright notice and this permission notice appear in 
  37. supporting documentation, and that the names of Digital or MIT not be
  38. used in advertising or publicity pertaining to distribution of the
  39. software without specific, written prior permission.  
  40.  
  41. DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
  42. ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
  43. DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
  44. ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
  45. WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
  46. ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  47. SOFTWARE.
  48.  
  49. ******************************************************************/
  50.  
  51. #ifndef GCSTRUCT_H
  52. #define GCSTRUCT_H
  53.  
  54. #include "gc.h"
  55.  
  56. #include "miscstruct.h"
  57. #include "region.h"
  58. #include "pixmap.h"
  59. #include "screenint.h"
  60. #include "dixfont.h"
  61.  
  62. /*
  63.  * functions which modify the state of the GC
  64.  */
  65.  
  66. typedef struct _GCFuncs {
  67.     void    (* ValidateGC)();   /* pGC, pDrawable */
  68.     void    (* ChangeGC)();        /* pGC, mask */
  69.     void    (* CopyGC)();        /* pGCSrc, mask, pGCDst */
  70.     void    (* DestroyGC)();    /* pGC */
  71.     void    (* ChangeClip)();   /* pGC, clipType, pointer, nrects */
  72.     void    (* DestroyClip)();  /* pGC */
  73.     void    (* CopyClip)();        /* pgcDst, pgcSrc */
  74.     DevUnion    devPrivate;
  75. } GCFuncs;
  76.  
  77. /*
  78.  * graphics operations invoked through a GC
  79.  */
  80.  
  81. typedef struct _GCOps {
  82.     void    (* FillSpans)();
  83.     void    (* SetSpans)();
  84.     void    (* PutImage)();
  85.     RegionPtr    (* CopyArea)();
  86.     RegionPtr    (* CopyPlane)();
  87.     void    (* PolyPoint)();
  88.     void    (* Polylines)();
  89.     void    (* PolySegment)();
  90.     void    (* PolyRectangle)();
  91.     void    (* PolyArc)();
  92.     void    (* FillPolygon)();
  93.     void    (* PolyFillRect)();
  94.     void    (* PolyFillArc)();
  95.     int        (* PolyText8)();
  96.     int        (* PolyText16)();
  97.     void    (* ImageText8)();
  98.     void    (* ImageText16)();
  99.     void    (* ImageGlyphBlt)();
  100.     void    (* PolyGlyphBlt)();
  101.     void    (* PushPixels)();
  102.     void    (* LineHelper)();
  103.     DevUnion    devPrivate;
  104. } GCOps;
  105.  
  106. /* there is padding in the bit fields because the Sun compiler doesn't
  107.  * force alignment to 32-bit boundaries.  losers.
  108.  */
  109. typedef struct _GC {
  110.     ScreenPtr        pScreen;        
  111.     unsigned char    depth;    
  112.     unsigned char    alu;
  113.     unsigned short    lineWidth;          
  114.     unsigned short    dashOffset;
  115.     unsigned short    numInDashList;
  116.     unsigned char    *dash;
  117.     unsigned int    lineStyle : 2;
  118.     unsigned int    capStyle : 2;
  119.     unsigned int    joinStyle : 2;
  120.     unsigned int    fillStyle : 2;
  121.     unsigned int    fillRule : 1;
  122.     unsigned int     arcMode : 1;
  123.     unsigned int    subWindowMode : 1;
  124.     unsigned int    graphicsExposures : 1;
  125.     unsigned int    clientClipType : 2; /* CT_<kind> */
  126.     unsigned int    miTranslate:1; /* should mi things translate? */
  127.     unsigned int    tileIsPixel:1; /* tile is solid pixel */
  128.     unsigned int    unused:16; /* see comment above */
  129.     unsigned long    planemask;
  130.     unsigned long    fgPixel;
  131.     unsigned long    bgPixel;
  132.     /*
  133.      * alas -- both tile and stipple must be here as they
  134.      * are independently specifiable
  135.      */
  136.     PixUnion        tile;
  137.     PixmapPtr        stipple;
  138.     DDXPointRec        patOrg;        /* origin for (tile, stipple) */
  139.     FontPtr        font;
  140.     DDXPointRec        clipOrg;
  141.     DDXPointRec        lastWinOrg;    /* position of window last validated */
  142.     pointer        clientClip;
  143.     unsigned long    stateChanges;    /* masked with GC_<kind> */
  144.     unsigned long       serialNumber;
  145.     GCFuncs        *funcs;
  146.     GCOps        *ops;
  147.     DevUnion        *devPrivates;
  148. } GC;
  149.  
  150. #endif /* GCSTRUCT_H */
  151. @
  152.